package org.x.casemodule.enums;

public enum SyncDirectionEnum {

    //'IN','OUT','BIDIRECTIONAL'
    IN("IN", "IN"),
    OUT("OUT", "OUT"),
    BIDIRECTIONAL("BIDIRECTIONAL", "双向的");
    private String code;
    private String name;
    SyncDirectionEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }
    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static SyncDirectionEnum getByCode(String code) {
        for (SyncDirectionEnum value : SyncDirectionEnum.values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    public static SyncDirectionEnum getByName(String name) {
        for (SyncDirectionEnum value : SyncDirectionEnum.values()) {
            if (value.getName().equals(name)) {
                return value;
            }
        }
        return null;
    }


}
